package utilities;


import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;

public class DataParser4 {

	/**
	 * @param args
	 * @throws IOException 
	 */
	static String fileName = "file";
	public static String getFileName(){
		return fileName;
	}
	
	public static String[] file2StringArr(String fileName){	
		
		String str = new String(ReadNWriteAFile.readFile(fileName));
		//System.out.println(str);
		String strArr[]= str.split("\n");
		return strArr;
	}
	
	public static String getFirstName(String fileName){
		String strArr[] = file2StringArr(fileName);
		return strArr[0];
		
	}
	public static String getLastName(String fileName){
		String strArr[] = file2StringArr(fileName);
		return strArr[1];
		
	}
	
	public static String getAddress(String fileName){
		String strArr[] = file2StringArr(fileName);
		return strArr[2];
		
	}
	
	public static String getTel(String fileName){
		String strArr[] = file2StringArr(fileName);
		return strArr[3];
		
	}
	
	public static void main(String[] args) throws IOException {
		/*String fileName;
		fileName = "C:\\Users\\MyselfW\\customer1.txt";
		System.out.println("first name: " + getFirstName(fileName));
		System.out.println("last name: " + getLastName(fileName));
		System.out.println("address: " + getAddress(fileName));
		System.out.println("tel: " + getTel(fileName));*/
		System.out.println("filName: " + getFileName());
	}
}
